home *** CD-ROM | disk | FTP | other *** search
/ DOpus Plus / DOpus Plus.iso / Tutorial / C Guide / Time_module / includes / buildin.strings < prev    next >
Encoding:
Text File  |  1998-08-20  |  6.2 KB  |  248 lines

  1. #ifndef BUILDIN_H
  2. #define BUILDIN_H
  3.  
  4.  
  5. /****************************************************************************/
  6.  
  7.  
  8. /* This file was created automatically by CatComp.
  9.  * Do NOT edit by hand!
  10.  */
  11.  
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include <exec/types.h>
  15. #endif
  16.  
  17. #ifdef CATCOMP_ARRAY
  18. #undef CATCOMP_NUMBERS
  19. #undef CATCOMP_STRINGS
  20. #define CATCOMP_NUMBERS
  21. #define CATCOMP_STRINGS
  22. #endif
  23.  
  24. #ifdef CATCOMP_BLOCK
  25. #undef CATCOMP_STRINGS
  26. #define CATCOMP_STRINGS
  27. #endif
  28.  
  29.  
  30. /****************************************************************************/
  31.  
  32.  
  33. #ifdef CATCOMP_NUMBERS
  34.  
  35. #define MSG_TITLE 0
  36. #define MSG_CLOCK_DESC 1
  37. #define MSG_CLOCKABOUT 2
  38. #define MSG_CLOCKOK 3
  39. #define MSG_POP_CHANGEBACK 4
  40. #define MSG_POP_CHANGEFONT 5
  41. #define MSG_POP_SOUND 6
  42. #define MSG_POP_BORDER 7
  43. #define MSG_POP_AUTOSTART 8
  44. #define MSG_POP_ALARM 9
  45. #define MSG_POP_FIX 10
  46. #define MSG_POP_QUIT 11
  47. #define MSG_POP_ABOUT 12
  48. #define MSG_POPSUB_PLAIN 20
  49. #define MSG_POPSUB_INVISIBLE 21
  50. #define MSG_POPSUB_PICTURE 22
  51. #define MSG_CHOOSEFONT 23
  52. #define MSG_CHOOSEPIC 24
  53. #define MSG_ALARM 25
  54. #define MSG_OK 26
  55. #define MSG_CANCEL 27
  56. #define MSG_POPSUB_ALARMSET 60
  57. #define MSG_POPSUB_ALARMONOFF 61
  58. #define MSG_HOURS 62
  59. #define MSG_MINS 63
  60.  
  61. #endif /* CATCOMP_NUMBERS */
  62.  
  63.  
  64. /****************************************************************************/
  65.  
  66.  
  67. #ifdef CATCOMP_STRINGS
  68.  
  69. #define MSG_TITLE_STR "Time Module"
  70. #define MSG_CLOCK_DESC_STR "A nice clock"
  71. #define MSG_CLOCKABOUT_STR "     CoolClock 1.03\n© Helmut Hummel 1998"
  72. #define MSG_CLOCKOK_STR "Well done..."
  73. #define MSG_POP_CHANGEBACK_STR "Background"
  74. #define MSG_POP_CHANGEFONT_STR "Font"
  75. #define MSG_POP_SOUND_STR "Sound"
  76. #define MSG_POP_BORDER_STR "Border"
  77. #define MSG_POP_AUTOSTART_STR "Autostart"
  78. #define MSG_POP_ALARM_STR "Alarm"
  79. #define MSG_POP_FIX_STR "Fix all"
  80. #define MSG_POP_QUIT_STR "Quit"
  81. #define MSG_POP_ABOUT_STR "About..."
  82. #define MSG_POPSUB_PLAIN_STR "plain "
  83. #define MSG_POPSUB_INVISIBLE_STR "transparent"
  84. #define MSG_POPSUB_PICTURE_STR "picture"
  85. #define MSG_CHOOSEFONT_STR "Choose font for the clock"
  86. #define MSG_CHOOSEPIC_STR "Choose a picture"
  87. #define MSG_ALARM_STR "Enter a time"
  88. #define MSG_OK_STR "_Okay"
  89. #define MSG_CANCEL_STR "_Cancel"
  90. #define MSG_POPSUB_ALARMSET_STR "Set alarm"
  91. #define MSG_POPSUB_ALARMONOFF_STR "Alarm enabled"
  92. #define MSG_HOURS_STR "Hours"
  93. #define MSG_MINS_STR "Minutes"
  94.  
  95. #endif /* CATCOMP_STRINGS */
  96.  
  97.  
  98. /****************************************************************************/
  99.  
  100.  
  101. #ifdef CATCOMP_ARRAY
  102.  
  103. struct CatCompArrayType
  104. {
  105.     LONG   cca_ID;
  106.     STRPTR cca_Str;
  107. };
  108.  
  109. static const struct CatCompArrayType CatCompArray[] =
  110. {
  111.     {MSG_TITLE,(STRPTR)MSG_TITLE_STR},
  112.     {MSG_CLOCK_DESC,(STRPTR)MSG_CLOCK_DESC_STR},
  113.     {MSG_CLOCKABOUT,(STRPTR)MSG_CLOCKABOUT_STR},
  114.     {MSG_CLOCKOK,(STRPTR)MSG_CLOCKOK_STR},
  115.     {MSG_POP_CHANGEBACK,(STRPTR)MSG_POP_CHANGEBACK_STR},
  116.     {MSG_POP_CHANGEFONT,(STRPTR)MSG_POP_CHANGEFONT_STR},
  117.     {MSG_POP_SOUND,(STRPTR)MSG_POP_SOUND_STR},
  118.     {MSG_POP_BORDER,(STRPTR)MSG_POP_BORDER_STR},
  119.     {MSG_POP_AUTOSTART,(STRPTR)MSG_POP_AUTOSTART_STR},
  120.     {MSG_POP_ALARM,(STRPTR)MSG_POP_ALARM_STR},
  121.     {MSG_POP_FIX,(STRPTR)MSG_POP_FIX_STR},
  122.     {MSG_POP_QUIT,(STRPTR)MSG_POP_QUIT_STR},
  123.     {MSG_POP_ABOUT,(STRPTR)MSG_POP_ABOUT_STR},
  124.     {MSG_POPSUB_PLAIN,(STRPTR)MSG_POPSUB_PLAIN_STR},
  125.     {MSG_POPSUB_INVISIBLE,(STRPTR)MSG_POPSUB_INVISIBLE_STR},
  126.     {MSG_POPSUB_PICTURE,(STRPTR)MSG_POPSUB_PICTURE_STR},
  127.     {MSG_CHOOSEFONT,(STRPTR)MSG_CHOOSEFONT_STR},
  128.     {MSG_CHOOSEPIC,(STRPTR)MSG_CHOOSEPIC_STR},
  129.     {MSG_ALARM,(STRPTR)MSG_ALARM_STR},
  130.     {MSG_OK,(STRPTR)MSG_OK_STR},
  131.     {MSG_CANCEL,(STRPTR)MSG_CANCEL_STR},
  132.     {MSG_POPSUB_ALARMSET,(STRPTR)MSG_POPSUB_ALARMSET_STR},
  133.     {MSG_POPSUB_ALARMONOFF,(STRPTR)MSG_POPSUB_ALARMONOFF_STR},
  134.     {MSG_HOURS,(STRPTR)MSG_HOURS_STR},
  135.     {MSG_MINS,(STRPTR)MSG_MINS_STR},
  136. };
  137.  
  138. #endif /* CATCOMP_ARRAY */
  139.  
  140.  
  141. /****************************************************************************/
  142.  
  143.  
  144. #ifdef CATCOMP_BLOCK
  145.  
  146. static const char CatCompBlock[] =
  147. {
  148.     "\x00\x00\x00\x00\x00\x0C"
  149.     MSG_TITLE_STR "\x00"
  150.     "\x00\x00\x00\x01\x00\x0E"
  151.     MSG_CLOCK_DESC_STR "\x00\x00"
  152.     "\x00\x00\x00\x02\x00\x2A"
  153.     MSG_CLOCKABOUT_STR "\x00\x00"
  154.     "\x00\x00\x00\x03\x00\x0E"
  155.     MSG_CLOCKOK_STR "\x00\x00"
  156.     "\x00\x00\x00\x04\x00\x0C"
  157.     MSG_POP_CHANGEBACK_STR "\x00\x00"
  158.     "\x00\x00\x00\x05\x00\x06"
  159.     MSG_POP_CHANGEFONT_STR "\x00\x00"
  160.     "\x00\x00\x00\x06\x00\x06"
  161.     MSG_POP_SOUND_STR "\x00"
  162.     "\x00\x00\x00\x07\x00\x08"
  163.     MSG_POP_BORDER_STR "\x00\x00"
  164.     "\x00\x00\x00\x08\x00\x0A"
  165.     MSG_POP_AUTOSTART_STR "\x00"
  166.     "\x00\x00\x00\x09\x00\x06"
  167.     MSG_POP_ALARM_STR "\x00"
  168.     "\x00\x00\x00\x0A\x00\x08"
  169.     MSG_POP_FIX_STR "\x00"
  170.     "\x00\x00\x00\x0B\x00\x06"
  171.     MSG_POP_QUIT_STR "\x00\x00"
  172.     "\x00\x00\x00\x0C\x00\x0A"
  173.     MSG_POP_ABOUT_STR "\x00\x00"
  174.     "\x00\x00\x00\x14\x00\x08"
  175.     MSG_POPSUB_PLAIN_STR "\x00\x00"
  176.     "\x00\x00\x00\x15\x00\x0C"
  177.     MSG_POPSUB_INVISIBLE_STR "\x00"
  178.     "\x00\x00\x00\x16\x00\x08"
  179.     MSG_POPSUB_PICTURE_STR "\x00"
  180.     "\x00\x00\x00\x17\x00\x1A"
  181.     MSG_CHOOSEFONT_STR "\x00"
  182.     "\x00\x00\x00\x18\x00\x12"
  183.     MSG_CHOOSEPIC_STR "\x00\x00"
  184.     "\x00\x00\x00\x19\x00\x0E"
  185.     MSG_ALARM_STR "\x00\x00"
  186.     "\x00\x00\x00\x1A\x00\x06"
  187.     MSG_OK_STR "\x00"
  188.     "\x00\x00\x00\x1B\x00\x08"
  189.     MSG_CANCEL_STR "\x00"
  190.     "\x00\x00\x00\x3C\x00\x0A"
  191.     MSG_POPSUB_ALARMSET_STR "\x00"
  192.     "\x00\x00\x00\x3D\x00\x0E"
  193.     MSG_POPSUB_ALARMONOFF_STR "\x00"
  194.     "\x00\x00\x00\x3E\x00\x06"
  195.     MSG_HOURS_STR "\x00"
  196.     "\x00\x00\x00\x3F\x00\x08"
  197.     MSG_MINS_STR "\x00"
  198. };
  199.  
  200. #endif /* CATCOMP_BLOCK */
  201.  
  202.  
  203. /****************************************************************************/
  204.  
  205.  
  206. struct LocaleInfo
  207. {
  208.     APTR li_LocaleBase;
  209.     APTR li_Catalog;
  210. };
  211.  
  212.  
  213. #ifdef CATCOMP_CODE
  214.  
  215. STRPTR GetString(struct LocaleInfo *li, LONG stringNum)
  216. {
  217. LONG   *l;
  218. UWORD  *w;
  219. STRPTR  builtIn;
  220.  
  221.     l = (LONG *)CatCompBlock;
  222.  
  223.     while (*l != stringNum)
  224.     {
  225.         w = (UWORD *)((ULONG)l + 4);
  226.         l = (LONG *)((ULONG)l + (ULONG)*w + 6);
  227.     }
  228.     builtIn = (STRPTR)((ULONG)l + 6);
  229.  
  230. #undef LocaleBase
  231. #define LocaleBase li->li_LocaleBase
  232.     
  233.     if (LocaleBase)
  234.         return(GetCatalogStr(li->li_Catalog,stringNum,builtIn));
  235. #undef LocaleBase
  236.  
  237.     return(builtIn);
  238. }
  239.  
  240.  
  241. #endif /* CATCOMP_CODE */
  242.  
  243.  
  244. /****************************************************************************/
  245.  
  246.  
  247. #endif /* BUILDIN_H */
  248.